1. Field of the Invention
This invention relates to a decoder circuit, for example for use in memory addressing.
2. Description of the Related Art
FIG. 1 shows an example of the structure of a static random access memory (SRAM) and its addressing circuitry. The memory 1 comprises a grid of memory cells 2 arranged in rows and columns. In this example there are four rows and four columns but typical SRAMs have many more rows and columns. All the cells in a row are connected to a single wordline 3. All the cells in a column are connected to a single bitline 4. Each cell has two stable states, representing high and low output values. When one of the wordlines is activated each bitline takes on the state of the cell to which that bitline is connected and which is also connected to the activated wordline. The bitlines are connected to a multiplexer 5 which allows a single one of the bitlines to be selected to provide the final output from the memory at 6.
Each cell in the memory is allotted a number. To access a cell in the memory the cell""s number is applied in binary format to input lines 7. A decoder 8 takes some of the lines 7 (indicated at 9) as input and thereby determines which one of the wordlines should be activated to access the cell. The remainder of the lines 7 (indicated at 10) pass to the multiplexer 5, which thereby determines which of the bitlines should be selected so that the final output at 6 takes on the state of the desired cell.
FIG. 2 shows one example of a structure for decoder 8. The lines 9 each branch through an inverter 10 so that address signals representing inverted (indicated at 11) and non-inverted (indicated at 12) versions of each of the lines 9 are available. The appropriate inverted or non-inverted version of each of the lines 9 is applied to a NAND gate 13 corresponding to each wordline. The output of each NAND gate passes to an inverter 14 which drives the respective wordline.
By means of the correct set of connections to each of the NAND gates a wordline is activated only when the appropriate set of inputs is applied at 9. This circuit is simple, but has a number of disadvantages if the number of address line inputs is increased.
1. In many important applicationsxe2x80x94for example in the caches of high-speed processorsxe2x80x94speed of access to the desired memory cell is crucial. However, the large NAND gates are relatively slow.
2. In almost all applicationsxe2x80x94and especially in battery-powered applicationsxe2x80x94power consumption is very important. However, in the system of FIG. 2 as the input lines 9 change values potentially many, or all, of the distributed address signals will change, giving rise to a high current consumption. The current consumption is further increased by the need to generate an inverted version of each input line to the decoder.
In an alternative structure for decoder 8 a pre-decode level is added so that fewer distributed signals can change as the input lines 9 change values. In the pre-decode level the input lines 9 are split into groups that are processed by a first level of NAND gates. The outputs from those NAND gates pass to a second level of NAND gates whose outputs are inverted to drive the wordlines. Since only one of the lines that connect the two levels of NAND gates changes for each change in input values the maximum power consumption is less than for the structure of FIG. 2. Two levels of processing in the alternative structure make it relatively slow for small numbers of addresses, but for wider decoders (e.g. five or more addresses) it can be faster.
An alternative solution is to use a precharge decode structure. FIG. 3 illustrates precharge decode circuitry that represents an alternative structure for decoder 8. As before, inverted 11 and non-inverted 12 versions of each of the input lines 9 to the decoder are generated. A decode line 20 is provided for each workline. Each wordline is driven by an inverter 14 which receives the output from a two-input RAND gate 18. One of the inputs to the NAND gate 18 is a common timing enable signal at 19. The other of the inputs is from the respective decode line 20.
Each decode line can be taken high by a respective PMOS precharge transistor 21. The precharge transistors are is connected with their sources to a high voltage (VDD) their drains to the respective decode line and their gates to a common precharge signal at 22. Each decode line can be taken low by any of a number of NMOS addressing transistors. The addressing transistors 23 are connected with their drains to the respective decode line, their sources to a low voltage (ground) and their gates to a selected one of the inverted and non-inverted input lines 11, 12. The inputs to the gates of the addressing transistors are arranged so that one addressing transistor of each decode line receives a selected inverted or non-inverted version of each of the input lines 9.
In use, to decode a set of signals applied to lines 9, a pulse is applied to the precharge line 22 so that the decode lines float at VDD. Then the signals from the input lines 9 are applied to the addressing transistors 23. At all the decode lines corresponding to all the undesired wordlines at least one of the addressing transistors is turned on, so that those decode lines can all discharge to ground. At the decode line corresponding to the desired wordline none of the addressing transistors is turned on, so that decode tine continues to float at VDD. After a delay that is sufficiently long for the voltages on all the undesired decode lines to have fallen, a signal is applied to the timing enable line 19. This causes the NAND gate 18 corresponding to the decode line that remains high to produce a low output, whereas all the other NAND gates produce high outputs. By virtue of the inverters 14 this causes the desired one of the wordlines to be selected.
The delay before application of the timing enable signal is crucial to the operation of the precharge circuit. The timing enable signal cannot be applied before all the undesired decode lines have discharged to below the input threshold voltage of the NAND gates 18, otherwise more than one wordline will be selected. Therefore, the delay is dependant on the speed with which the decode lines discharge. A decode tine with all of its addressing transistors turned on will discharge quickly but a decode line with only one of its addressing transistors turned on will discharge relatively slowly. The timing enable signal is usually derived from the arrangement shown at 24. Another instance of the decode structure is provided, this time with all but one of its addressing inputs connected to ground. The decode line 25 of the arrangement 24 therefore fails towards ground as slowly as any of the undesired decode lines can. The enable input to the NAND gate 26 of the arrangement 24 is held high. As soon as the decode line has fallen sufficiently the output 27 of the NAND gate goes high. The output 27 provides the timing enable signal at 19.
The precharge structure of FIG. 3 can be faster than the structures of FIG. 2. However, the discharge of all the undesired decode lines gives rise to high power consumption, and the necessary delay before the timing enable signal is generated reduces the speed of operation of the circuit. The choice between a static decoder (e.g. as shown in FIG. 2) and a precharge decoder is not clear-cut and very often both options have to be investigated when undertaking, a design.
It would be desirable to have a decoder circuit that allowed for faster decoding, preferably at reduced power consumption. In addition to providing a technically superior solution, such a circuit could save a considerable amount of investigatory design work.
According to the present invention there is provided a decode circuit for selecting one of a plurality of output lines in dependence on the status of a plurality at input lines, the circuit comprising: a first decode arrangement comprising: a first decode node; first precharging circuitry for charging the first decode node to a charging potential; first discharging circuitry comprising a plurality of switching means, each operable in dependence on the status of a respective one of the input lines to couple the first decode node to a discharging potential; and first selection circuitry coupled to a respective one of the output lines and operable in response to a first enable signal to select that output line if the first decode node has not discharged; and a second decode arrangement comprising: a second decode node; second precharging circuitry for charging the second decode node to a charging potential; second discharging circuitry comprising a plurality of switching means each operable in dependence on the status of a respective one of the input lines to couple the second decode node to a discharging potential; and second selection circuitry coupled to a respective one of the output lines and operable in response to a second enable signal to select that output line if the second discharge node has not discharged; wherein the first enable signal is derived from the potential of the second decode node.
Some preferred features of the first decode arrangement will now be described. Equivalent features are preferred to be present in the second decode arrangement, mutatis mutandis.
The first discharging circuitry preferably comprises a plurality of transistors having their drains connected to the first decode node, their sources connected to the discharging potential and their gates connected to receive a discharging signal dependant on the status of a respective one of the input lines. Each discharging signal suitably represents an inverted or non-inverted version of the respective one of the input lines.
The first precharge circuitry preferably comprises a precharge transistor having its source connected to the precharge potential and its drain connected to the decode node.
The first selection circuitry preferably comprises a selection transistor having its gate connected to the first decode node, its source connected to receive the first enable signal, and its drain arranged to provide a selection signal for the respective one of the output lines. There is suitably an inverter or other (e.g. non-inverting) drive means responsive to the selection signal to drive the respective one of the output lines. The first selection circuitry is suitably operable to select the respective one of the output lines by reducing the potential on the drain of the selection transistor, e.g. by drainage of that potential to the source of the selection transistor. There may be further precharge circuitry for precharging the gate of the selection transistor to a charging potential. The further precharge circuitry may comprise a further precharge transistor having its source connected to the precharge potential and its drain connected to the drain of the selection transistor, The said precharge transistor and the said further precharge transistor may be operable in response to a common precharge signal.
The second decode node may be connected directly to the source of the selection transistor.
The circuit may comprise a first holding transistor having its source connected to a charging potential, its drain connected to the decode node and its gate connected to the drain of the selection transistor. The circuit may comprise a second holding transistor having its source connected to a charging potential, its drain connected to the drain of the selection transistor and its gate connected to the decode node. The first and second holding transistors are preferably inverting (PMOS) transistors.
The second enable signal is suitably derived from the potential of the first decode node. Preferably the first decode node is connected to the source of an equivalent selection transistor of the second decode arrangement.
The first selection circuitry may be capable of selecting its respective output line in response to opposite values of the input lines than those in response to which the second selection circuitry is capable of selecting its respective output line.
Each output line may be or may be coupled to a wordline of a memory unit. The input lines suitably together represent an address, for selection. The input lines suitably convey binary state signals representing the said address.
The precharge potentials may be the same or different. The precharge potentials are preferably higher than the discharge potential (e.g. VDD and ground/0 V respectively) but the precharge potential could alternatively be lower than the discharge potential. It will be appreciated that for many implementations references to the source or drain of a transistor are arbitrary, and that any of the transistors referred to could be replaced by other switching means such as relays.
The decoder may be used for memory addressing or other applications such as decoding instruction codes.